<template>
  <div class="body-box">
    <div class="title">
      <div class="b"></div>
      <div class="w">功能</div>
    </div>
    <div class="body-cell">
      <div
        class="cell-item"
        v-for="(item,index) in cellItems"
        :key="index"
        @click="router.push(item.route)"
      >
        <span>
          <van-icon
            :name="item.icon"
            size="27"
            color="#1ab57f"
          />
        </span>
        <div>
          {{item.name}}
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import {useRouter} from "vue-router"
const router = useRouter()

const cellItems = [
  {
    icon:'records-o',
    name:'我的项目',
    route:'/projects'
  },{
    icon:'points',
    name:'资料管理',
    route:''
  },{
    icon:'records-o',
    name:'日志',
    route:'/log'
  }
  ,{
    icon:'friends-o',
    name:'联系人',
    route:''
  },
]
</script>

<style scoped lang="less">
.body-box{
  border-radius: 20px;
  margin: 50px auto 0 auto;
  width: 98%;
  height: 350px;
  box-sizing: border-box;
  background-color: #fff;
  //overflow-y: scroll;
  padding-top: 20px;
  box-shadow: 0 0 15px lightgray;
  .title{
    height: 50px;
    display: flex;
    justify-content: left;
    margin-left: 15px;
    margin-top: 30px;
    align-items: center;
    margin-bottom: 20px;
    .b{
      height: 35px;
      background-color: #1dcf91;
      width: 8px;
      margin-right: 15px;
      line-height: 50px;
    }
    .w{
      line-height: 50px;
      font-size: 35px;
      letter-spacing: 5px;
      font-weight: 600;
    }
  }
  .body-cell{
    overflow-y: scroll;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    height: 400px;
    margin-top: 50px;
    .cell-item{
      height:150px;
      width: 152px;
      margin-bottom: 15px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      //font-weight: 600;
      letter-spacing: 1px;
      span{
        margin-bottom: 20px;
      }
    }
  }
}
</style>